package com.zqs.common;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

@Data
public class PageVO {
    private Integer current;

    private Integer size;

    public <T> Page<T> getPage() {
        Page<T> objectPage = new Page<T>();
        objectPage.setCurrent(this.current == null || this.current < 1 ? 1 : this.current);
        objectPage.setSize(this.size == null || this.size < 1 ? 10 : this.size);
        return objectPage;
    }
}
